﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace JsEditor
{
    [DefaultEvent("OnPicPick")]
    public partial class JsPicPicker : UserControl
    {

        [Description("选取事件"), Category("自定义事件")]
        public event EventHandler OnPicPick;

        [Description("图片文字"), Category("自定义属性"),DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public override string Text
        {
            get { return textBox1.Text; }
            set { textBox1.Text =  value; }
        }

        public Image Image
        {
            get { return pictureBox1.Image; }
            set 
            {
                pictureBox1.Image = value;
            }
        }


        public JsPicPicker()
        {
            InitializeComponent();
        }


        private void button1_Click(object sender, EventArgs e)
        {
            if (OnPicPick != null)
                OnPicPick(this, e);
        }



    }
}
